/* options.css - 页面专属样式 */

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* 头部特定样式 */
.header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* 配置状态指示器 */
.config-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    animation: pulse 2s infinite;
}

.status-indicator.unsaved {
    background: #ff6b6b;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* 主要内容区域 */
.main-content {
    padding: 30px;
}

/* API配置特定样式 */
.text-input:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.text-input:invalid {
    border-color: #dc3545;
}

.api-status-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    border-left: 4px solid #ff6b6b;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-label {
    font-weight: 500;
    color: #666;
}

.status-value {
    font-weight: 600;
    color: #333;
}

.status-value.connected,
.status-value.logged-in {
    color: #28a745;
}

.status-value.disconnected {
    color: #dc3545;
}

.status-value.logged-out {
    color: #6c757d;
}

/* 按钮特定样式 */

/* 开关特定样式 */
.switch-container input:checked + .switch-slider {
    background: #4CAF50;
}

/* 数字输入框特定样式 */
.number-input {
    width: 120px;
    text-align: center;
}

.number-input:focus {
    border-color: #ff6b6b;
}

/* 版本选择特定样式 */
.select-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.version-select {
    min-width: 200px;
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.version-select:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* URL模式配置 */
.url-patterns-container {
    margin-bottom: 20px;
}

.add-pattern-form {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.pattern-input:focus {
    border-color: #ff6b6b;
}

.add-btn {
    padding: 12px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.add-btn:hover {
    background: #218838;
}

/* URL模式列表 */
.patterns-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: #f8f9fa;
}

.pattern-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e1e8ed;
    transition: 0.2s;
}

.pattern-item:last-child {
    border-bottom: none;
}

.pattern-item.disabled {
    opacity: 0.6;
    background: #f1f3f4;
}

.pattern-item.disabled .pattern-text {
    text-decoration: line-through;
    color: #6c757d;
}

.pattern-text {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #495057;
    flex: 1;
    margin-right: 12px;
}

.pattern-enabled {
    margin-right: 12px;
}

.remove-pattern {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.remove-pattern:hover {
    background: #c82333;
}

/* 模式帮助 */
.pattern-help {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.pattern-help h4 {
    margin-bottom: 12px;
    color: #495057;
}

.pattern-help ul {
    list-style: none;
    padding: 0;
}

.pattern-help li {
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}

.pattern-help code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

/* 监控类型 */
.monitor-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.checkbox-item input:checked + .checkmark {
    background: #4CAF50;
    border-color: #4CAF50;
}

/* 底部 */
.footer {
    background: #f8f9fa;
    padding: 30px;
    border-top: 1px solid #e1e8ed;
}

.footer .button-group {
    margin-bottom: 20px;
}

.footer button {
    padding: 12px 24px;
}

.save-btn {
    background: #28a745;
    color: white;
}
.save-btn:hover {
    background: #218838;
}

.reset-btn {
    background: #6c757d;
    color: white;
}
.reset-btn:hover {
    background: #545b62;
}

.export-btn, .import-btn {
    background: #17a2b8;
    color: white;
}
.export-btn:hover, .import-btn:hover {
    background: #138496;
}

/* 状态消息 */
.status-message {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Toast 通知 - 更明显的临时通知 */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    user-select: none;
}

.toast-notification:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.toast-notification::after {
    content: "点击关闭";
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 10px;
    opacity: 0.7;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.toast-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-left: 4px solid #17a2b8;
}

.toast-notification.toast-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
    border-left: 4px solid #c82333;
}

.toast-notification.toast-info {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    color: white;
    border-left: 4px solid #138496;
}

/* 空状态 */
.empty-patterns {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 8px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .footer button {
        width: 100%;
    }
    
    .add-pattern-form {
        flex-direction: column;
    }
    
    .monitor-types {
        grid-template-columns: 1fr;
    }
} 